package com.wiscamp.ninechapters.problems.application.assemblers;

import com.wiscamp.ninechapters.problems.application.dto.commands.CreateProblemSetCommand;
import com.wiscamp.ninechapters.problems.application.dto.commands.sets.UpdateProblemSetCommand;
import com.wiscamp.ninechapters.problems.application.dto.vo.sets.ProblemSetVO;
import com.wiscamp.ninechapters.problems.application.dto.vo.sets.SetProblemVO;
import com.wiscamp.ninechapters.problems.domain.models.sets.ProblemSet;
import com.wiscamp.ninechapters.problems.domain.models.sets.SetProblem;
import org.mapstruct.Mapper;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

@Mapper(componentModel = "spring",
        unmappedTargetPolicy = ReportingPolicy.IGNORE,
        unmappedSourcePolicy = ReportingPolicy.IGNORE,
        nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
public interface ProblemSetAssembler {

    ProblemSetAssembler Instance = Mappers.getMapper(ProblemSetAssembler.class);

    // region problem set
    ProblemSetVO toProblemSetVO(ProblemSet entity);

    ProblemSet fromCreateCommand(CreateProblemSetCommand command);

    ProblemSet fromUpdateCommand(UpdateProblemSetCommand command);
    // endregion

    // region set problem
    SetProblemVO toSetProblemVO(SetProblem entity);
    // endregion

}
